[IA64] Make Big-Endian appliation run on top of dom0 and domU
authorAlex Williamson <alex.williamson@hp.com>
Tue, 11 Sep 2007 21:09:33 +0000 (15:09 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 11 Sep 2007 21:09:33 +0000 (15:09 -0600)
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
xen/arch/ia64/xen/faults.c

index 296f50326ee960f3efcdd355c1fb50bfd7a2a59a..f201d3fe564273c49bafca7b8cb29d6da5fef366 100644 (file)
@@ -94,7 +94,9 @@ static void reflect_interruption(unsigned long isr, struct pt_regs *regs,
        regs->cr_ipsr = vcpu_pl_adjust(regs->cr_ipsr, IA64_PSR_CPL0_BIT);
        if (PSCB(v, dcr) & IA64_DCR_BE)
                regs->cr_ipsr |= IA64_PSR_BE;
-
+       else
+               regs->cr_ipsr &= ~IA64_PSR_BE;
+    
        if (PSCB(v, hpsr_dfh))
                regs->cr_ipsr |= IA64_PSR_DFH;  
        PSCB(v, vpsr_dfh) = 0;
@@ -140,6 +142,9 @@ void reflect_event(void)
        regs->cr_ipsr = vcpu_pl_adjust(regs->cr_ipsr, IA64_PSR_CPL0_BIT);
        if (PSCB(v, dcr) & IA64_DCR_BE)
                regs->cr_ipsr |= IA64_PSR_BE;
+       else
+               regs->cr_ipsr &= ~IA64_PSR_BE;
+
 
        if (PSCB(v, hpsr_dfh))
                regs->cr_ipsr |= IA64_PSR_DFH;
@@ -241,6 +246,9 @@ void ia64_do_page_fault(unsigned long address, unsigned long isr,
                                               IA64_PSR_CPL0_BIT);
                if (PSCB(current, dcr) & IA64_DCR_BE)
                        regs->cr_ipsr |= IA64_PSR_BE;
+               else
+                       regs->cr_ipsr &= ~IA64_PSR_BE;
+
 
                if (PSCB(current, hpsr_dfh))
                        regs->cr_ipsr |= IA64_PSR_DFH;